package servlet;

import java.io.IOException;
import java.io.PrintWriter;
import java.util.List;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import Bizlogic.CAManager;
import DAO.MySQL.OrderDetailDAOImpl;
import Model.OrderDetail;

/**
 * @author TONY
 *
 */
public class GetTransactionHistory extends HttpServlet {

	
	public void doGet(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {
        CAManager ca = new CAManager();
    	//System.out.print("in");
		//OrderDetailDAOImpl ordi=new OrderDetailDAOImpl();
		List<OrderDetail> list=ca.getAllOrderDetail();
		System.out.print(list.size());
		request.setAttribute("list", list);
		request.getRequestDispatcher("GetTransactionHistory.jsp").forward(request, response);
	}

	/**
	 * Initialization of the servlet. <br>
	 *
	 * @throws ServletException if an error occurs
	 */
	public void init() throws ServletException {
		// Put your code here
	}

}
